<?php

namespace App\Http\Model;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Redis;


class SendPhoneUserPearl extends Base
{
    protected $table = 'send_phone_pearl_log';

    public function __construct(array $attributes = [])
    {
        parent::__construct($this->table, $attributes);
    }


    public function create($data)
    {
        $d['user_id'] = $data['user_id'];
        $d['award_pearl'] = $data['award_pearl'] ?? 0;
        $d['updated_at'] = $d['created_at'] = date_ymd();
        return DB::table($this->table)->insert($d);
    }

}